import { type } from "os";

//定义获取医院列表的参数的类型
export interface getHospitalSearchParamsType {
  hoscode?: string;
  hosname?: string;
  hostype?: string;
  provinceCode?: string;
  cityCode?: string;
  districtCode?: string;
  status?: 0 | 1;
}

//定义获取医院列表的content里面的每一项的数据类型
export interface getHospitalListItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: 0 | 1;
  param: {
    hostypeString: string;
    fullAddress: string;
  };
  hoscode: string;
  hosname: string;
  hostype: string;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  logoData: string;
  intro: string;
  route: string;
  status: 0 | 1;
  bookingRule: getBookingRuleType | null
}

//定义获取医院列表的content的数据类型
export type getHospitalListContentType = getHospitalListItemType[];

//定义获取医院列表的完整数据
export interface getHospitalListType {
  content: getHospitalListContentType;
  pageable: {
    sort: {
      sorted: boolean;
      unsorted: boolean;
      empty: boolean;
    };
    pageNumber: number;
    pageSize: number;
    offset: number;
    paged: boolean;
    unpaged: boolean;
  };
  totalElements: number;
  totalPages: number;
  last: boolean;
  first: boolean;
  sort: {
    sorted: boolean;
    unsorted: boolean;
    empty: boolean;
  };
  numberOfElements: number;
  size: number;
  number: number;
  empty: boolean;
}

// 设置获取请求省份的数据每一项的类型
export interface getProvinceItemType {
  id: string;
  createTime: string;
  updateTime: string;
  isDeleted: 0 | 1;
  param: object;
  parentId: number;
  name: string;
  value: string;
  dictCode: string;
  hasChildren: boolean;
}
//设置获取请求省份的数据类型
export type getProvinceListType = getProvinceItemType[];

//设置获取请求市每一项数据类型
export interface getCityItemType {
  createTime: string;
  dictCode: number;
  hasChildren: boolean;
  id: string;
  isDeleted: 0 | 1;
  name: string;
  param: object;
  parentId: string;
  updateTime: string;
  value: string;
}
//设置获取请求市的数据类型
export type getCityType = getCityItemType[];

//定义请求详情页数据中bookingRule的类型
export interface getBookingRuleType{
    cycle: number;
    releaseTime: string;
    stopTime: string;
    quitDay: number;
    quitTime: string;
    rule: any[];
};
//定义请求详情页数据类型
export interface getHospitalDetailType {
  bookingRule?: getBookingRuleType,
  hospital?: getHospitalListItemType,
};
